package com.zbw.common.controller.Feign;

import com.zbw.common.entity.Author;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Description
 * @Author Zbw
 * @Date 2024/6/25
 */
@FeignClient("novel-author")
@Component
public interface AuthorFeign {

    @RequestMapping("author/checkPenName")
    Boolean checkPenName(@RequestParam("penName")String penName);

    @RequestMapping("author/queryAuthor")
    Author queryAuthor(@RequestParam("userId")Long userId);

    @RequestMapping("author/register")
    String register(@RequestParam("userId")Long userId,@RequestBody Author author);

    @RequestMapping("author/isAuthor")
    boolean isAuthor(@RequestParam("userId")Long userId);
}
